home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 4
/
Amiga Tools 4.iso
/
tools
/
netzwerk
/
magplip
/
source
/
smakefile
< prev
next >
Wrap
Makefile
|
1996-02-26
|
6KB
|
223 lines
#!sc:c/smake
#
#####################################################################
#
# $VER: smakefile 6.4 (05 Dec 1995)
#
# plip.device - Parallel Line Internet Protocol
#
# Original code written by Oliver Wagner and Michael Balzer.
#
# This version has been completely reworked by Marius Gröger,
# introducing slight protocol changes. The new source is
# a lot better organized and maintainable.
#
# (C) Copyright 1993-1994 Oliver Wagner & Michael Balzer
# (C) Copyright 1995 Marius Gröger
# All Rights Reserved
#
# $HISTORY:
#
# 05 Dec 1995 : 006.004 : added target `release' to help
# 03 Sep 1995 : 006.003 : added missing dependency port.asm/magplip.i
# 20 Aug 1995 : 006.002 : support for new port.asm file
# 30 Jul 1995 : 006.001 : bumped to version 6 to reflect smake requirement
# 24 Apr 1995 : 001.004 : forgot to release magplip.i
# 09 Mar 1995 : 001.003 : doesn't do anymore redundant linker runs
# 04 Mar 1995 : 001.002 : maintains different CPU-optimized object files
# 18 Feb 1995 : 001.001 : added help facility
# 12 Feb 1995 : 001.000 : created
#
#####################################################################
#####################################################################
#
# installation drawer and names of device
#
INSTALL_DIR = AmiTCP:/Special/DEVS/Networks
DEVICE_DIR = /DEVS/Networks
BASENAME = magplip
RELNAME = magplip
NAME = magplip.device
VERSION = 37
#
#####################################################################
#####################################################################
#
# Aminet infos
#
AN_AUTHOR = groeger@gundel.zdv.uni-mainz.de
AN_UPLOADER = groeger@gundel.zdv.uni-mainz.de
AN_SHORT = SANA-II parallel port driver
AN_TYPE = comm/net
#
#####################################################################
#####################################################################
#
# following stuff is your configuration
#
LIBS = LIB LIB:amiga.lib LIB lib:sc.lib LIB lib:debug.lib
CINCLUDES = INCDIR "NETINCLUDE:"
ASMINCLUDES = INCDIR="INCLUDEA:" INCDIR="NETINCLUDE:"
CPUSUFFIX = 020 # 000 010 020 030 040 ANY
CPUCCOPT = CPU=68$(CPUSUFFIX)
CP = C:Copy
MV = C:Rename
RM = C:Delete >NIL:
LD = sc:c/slink
CC = sc:c/sc
AS = sc:c/sc
MAKE = sc:c/smake
BUMPREV = C:bumprev
SETREV = C:SetRev
PROTECT = protect
BUILD_AMINET= /s/build-aminet
ECHO = Echo
#
#####################################################################
#####################################################################
#
# assembler/compiler flags
#
# this applies to normal and optimized compilation:
#
STDFLAGS = $(CINCLUDES) NOMULTIPLEINCLUDES ERRREXX COMMENTNEST NOSTKCHK NOCHKABORT\
SMALLCODE SMALLDATA VERBOSE NOICONS STRICT ANSI
#
# this applies only to normal compilation:
#
NORMCFLAGS = $(STDFLAGS)
#
# this applies only to optimized compilation:
#
OPTCFLAGS = $(STDFLAGS) $(CPUCCOPT) PARAMETERS=REGISTERS OPT OPTTIME OPTINLINE\
OPTSCHEDULE STRINGMERGE STRUCTUREEQUIVALENCE
#
# this applies to assembler compilation
#
AFLAGS = $(ASMINCLUDES) VERBOSE SMALLCODE SMALLDATA
#
#####################################################################
#####################################################################
#
# linkage flags
#
LDFLAGS = NOICONS SC SD ND $(LIBS) TO
OPTLDFLAGS = NOICONS SC SD ND $(LIBS) TO
#
#####################################################################
#####################################################################
#
# the object files
#
NORMOBJ=rt.o device.no server.no track.no crc16.o port.o
OPTOBJ=rt.o device.opt$(CPUSUFFIX) server.opt$(CPUSUFFIX) track.opt$(CPUSUFFIX)\
crc16.o port.o
#
#####################################################################
#####################################################################
#
# rules
#
# compile a file normally
#
.c.no:
$(CC) $(NORMCFLAGS) $*.c
-@$(RM) $*.no
@$(MV) $*.o $*.no
#
# compile a file optimizing
#
.c.opt$(CPUSUFFIX):
$(CC) $(OPTCFLAGS) $*.c
-@$(RM) $*.opt$(CPUSUFFIX)
@$(MV) $*.o $*.opt$(CPUSUFFIX)
#
# assemble a file
#
.asm.o:
$(AS) $(AFLAGS) $*.asm
#
#####################################################################
#####################################################################
#
# targets
#
help:
-@Echo "Usage:"
-@Echo "To make an unoptimized version"
-@Echo " $(MAKE) all"
-@Echo "To make an optimized version"
-@Echo " $(MAKE) all_opt"
-@Echo "To install an unoptimized version"
-@Echo " $(MAKE) install"
-@Echo "To install an optimized version"
-@Echo " $(MAKE) install"
-@Echo "To increment the revision"
-@Echo " $(MAKE) newrev"
-@Echo "To remove all intermediate files for unoptimized the version"
-@Echo " $(MAKE) clean_norm"
-@Echo "To remove all intermediate files for optimized the version"
-@Echo " $(MAKE) clean_opt"
-@Echo "To %remove all intermediate files"
-@Echo " %$(MAKE) clean"
-@Echo "To create a distribution"
-@Echo " $(MAKE) release"
all: $(DEVICE_DIR)/$(NAME)
all_opt: $(DEVICE_DIR)/$(NAME).$(CPUSUFFIX)
install: all
$(CP) $(DEVICE_DIR)/$(NAME) $(INSTALL_DIR)/$(NAME)
install_opt: all_opt
$(CP) $(DEVICE_DIR)/$(NAME).$(CPUSUFFIX) $(INSTALL_DIR)/$(NAME)
newrev:
$(BUMPREV) $(VERSION) $(BASENAME)
clean_norm:
-@$(RM) *.o
-@$(RM) *.no
clean_opt:
-@$(RM) *.o
-@$(RM) *.opt*
clean: clean_norm clean_opt
release:
$(MAKE) CPUSUFFIX=000 all_opt
$(MAKE) CPUSUFFIX=020 all_opt
$(MAKE) CPUSUFFIX=040 all_opt
$(BUILD_AMINET) "$(RELNAME)" "$(BASENAME)" "/ReadMe" "//$(BASENAME)" "$(AN_AUTHOR)" "$(AN_UPLOADER)" "$(AN_SHORT)" "$(AN_TYPE)" CLEAN
$(DEVICE_DIR)/$(NAME).$(CPUSUFFIX): $(OPTOBJ)
$(LD) $(OPTOBJ) $(OPTLDFLAGS) $@
$(DEVICE_DIR)/$(NAME): $(NORMOBJ)
$(LD) $(NORMOBJ) $(LDFLAGS) $@
#
#####################################################################
#####################################################################
#
# various dependencies
#
rt.o: rt.asm magplip.i magplip_rev.i
crc16.o: crc16.asm
port.o: port.asm magplip.i
device.opt$(CPUSUFFIX) device.no: device.c magplip.h
server.opt$(CPUSUFFIX) server.no: server.c magplip.h
track.opt$(CPUSUFFIX) track.no: track.c magplip.h
#
#####################################################################